Skip to content

Conversation

@KodaiD
Copy link
Contributor

@KodaiD KodaiD commented Jul 28, 2025

Description

This PR adds integration tests with object names that include both upper and lower case letters. This is to ensure that the case-sensitivity issue is properly tested, especially for databases like Cassandra that have specific rules regarding case sensitivity.

Related issues and/or PRs

Changes made

  • Added DistributedStorageCaseSensitivityIntegrationTest and DistributedStorageAdminCaseSensitivityIntegrationTest that use object names with both upper and lower case letters.
    • DistributedStorageCaseSensitivityIntegrationTest extends DistributedStorageIntegrationTestBase.
    • DistributedStorageAdminCaseSensitivityIntegrationTest extends DistributedStorageAdminIntegrationTestBase.
  • Updated DistributedStorageWithReservedKeywordIntegrationTestBase to extend DistributedStorageIntegrationTestBase to reduce code duplication.

Checklist

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • I have considered whether similar issues could occur in other products, components, or modules if this PR is for bug fixes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Release notes

N/A

@KodaiD KodaiD requested a review from Copilot July 28, 2025 05:00
@KodaiD KodaiD self-assigned this Jul 28, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds case sensitivity testing for ScalarDB storage adapters by introducing mixed-case object names in integration tests. The changes ensure that case-sensitivity handling is properly tested across different database backends, particularly for databases like Cassandra that have specific case sensitivity rules.

  • Adds DistributedStorageCaseSensitivityIntegrationTest and DistributedStorageAdminCaseSensitivityIntegrationTest base classes with mixed-case object names
  • Refactors DistributedStorageWithReservedKeywordIntegrationTestBase to extend DistributedStorageIntegrationTestBase for better code reuse

Reviewed Changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
DistributedStorageWithReservedKeywordIntegrationTestBase.java Refactored to extend base class, removing duplicated code
DistributedStorageCaseSensitivityIntegrationTest.java New base test class with mixed-case object names
DistributedStorageAdminCaseSensitivityIntegrationTest.java New admin test class with mixed-case object names
DistributedStorageAdminIntegrationTestBase.java Refactored to use methods for object names, enabling inheritance
Jdbc*.java Concrete implementations of case sensitivity tests for JDBC
Dynamo*.java Concrete implementations of case sensitivity tests for DynamoDB
Cosmos*.java Concrete implementations of case sensitivity tests for Cosmos DB
Cassandra*.java Concrete implementations of case sensitivity tests for Cassandra

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @KodaiD, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances our integration test coverage by introducing dedicated test suites for mixed-case object names across various distributed storage backends. The primary goal is to rigorously validate the system's behavior concerning case sensitivity, especially for databases like Cassandra that have distinct rules. This involves adding new abstract test classes, implementing them for specific database connectors, and refactoring existing test infrastructure to support this more flexible naming approach.

Highlights

  • New Case-Sensitivity Test Suites: I've introduced new abstract base integration test classes, DistributedStorageCaseSensitivityIntegrationTest and DistributedStorageAdminCaseSensitivityIntegrationTest. These classes are designed to specifically test operations using mixed-case object names (namespaces, tables, and columns) to ensure proper handling of case sensitivity across different storage backends.
  • Expanded Database Coverage: Concrete implementations of these new case-sensitivity test suites have been added for Cassandra, Cosmos DB, DynamoDB, and JDBC. This provides dedicated and comprehensive testing for how each specific database backend handles mixed-case identifiers in its operations.
  • Refactored Base Test Classes: The DistributedStorageAdminIntegrationTestBase has been refactored to abstract out namespace, table, and column names into protected methods. This change allows subclasses, such as the new case-sensitivity tests, to define their own naming conventions (e.g., mixed-case) without modifying the core test logic, making the test framework more flexible and extensible.
  • Integration Test Framework Alignment: The DistributedStorageWithReservedKeywordIntegrationTestBase now extends DistributedStorageIntegrationTestBase, streamlining the overall test hierarchy. Additionally, existing JDBC integration tests (JdbcDatabaseIntegrationTest and JdbcDatabaseWithReservedKeywordIntegrationTest) were updated to align with the new flexible naming methods, ensuring consistency across the test suite.
  • Database-Specific Test Adjustments: I've made specific adjustments for certain database backends. For Cassandra and DynamoDB, some tests were explicitly disabled where their native behavior regarding IS NULL conditions or null values in secondary indexes differs from the general expectation, with clear explanations provided in the code.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds integration tests for mixed-case object names, which is a valuable addition for ensuring case-sensitivity is handled correctly across different database systems. The refactoring of the base integration test classes to support this is a good approach.

My review has identified several areas where code duplication has been introduced in the new and modified test classes. I've provided suggestions to create common base classes for specific database tests (Cassandra, DynamoDB, and JDBC) to centralize duplicated logic, which will improve the overall maintainability of the test suite. I've also pointed out a minor redundant method call in the JDBC test classes.

@KodaiD KodaiD marked this pull request as ready for review July 29, 2025 07:51
@KodaiD KodaiD requested review from a team, Torch3333, brfrn169, feeblefakie and komamitsu and removed request for a team July 29, 2025 07:52
Copy link
Collaborator

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM. Left several minor comments. PTAL!

@KodaiD
Copy link
Contributor Author

KodaiD commented Jul 30, 2025

@brfrn169 Thank you for your review! I applied your suggestions. PTAL!

@KodaiD KodaiD requested a review from brfrn169 July 30, 2025 02:46
Copy link
Contributor

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 👍

Copy link
Collaborator

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

Copy link
Contributor

@Torch3333 Torch3333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@brfrn169 brfrn169 merged commit 14db577 into master Aug 1, 2025
155 of 160 checks passed
@brfrn169 brfrn169 deleted the update-integration-test branch August 1, 2025 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants